using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Avalonia.Markup.Xaml;
using Avalonia.VisualTree;
using LightCAD.Core;

namespace LightCAD.UI;

public partial class DrawingSpace : Avalonia.Controls.UserControl
{
    public DrawingSpace()
    {
        InitializeComponent();
        this.Initialized += DrawingSpace_Initialized;
    }

    public DrawingSpace(LcDocument document)
    {
        InitializeComponent();
        Document = document;
    }

    public LcDocument Document { get; }

    private void DrawingSpace_Initialized(object? sender, System.EventArgs e)
    {
        this.drawingEditor.Document = this.Document;

    }
}